<?php
function __advance_get_html($url)
	{    
        // is cURL installed yet?
        if (!function_exists('curl_init')){
            die('Sorry cURL is not installed!');
        }
        
		$_return = '';
        
		// OK cool - then let's create a new cURL resource handle
        $ch = curl_init();
        
        // Set URL to download
        curl_setopt($ch, CURLOPT_URL, $url);
        
        // User agent
        curl_setopt($ch, CURLOPT_USERAGENT, 'nhadat.net Crawler 1.0');
        
        // Include header in result? (0 = yes, 1 = no)
        curl_setopt($ch, CURLOPT_HEADER, 0);
    
        // Timeout in seconds
       curl_setopt($ch, CURLOPT_TIMEOUT, 10);
 
        
        // Should cURL return or print out the data? (true = return, false = print)
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        
        $_return = curl_exec($ch);
        curl_close($ch);
        
		return $_return;
	}